<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Baoge's File Server</title>
    <style>
        body,
        h1,
        table {
            margin: 0;
            padding: 0;
        }

        body {
            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
            background-color: #e0e0e0;
            color: #333;
            line-height: 1.6;
            padding: 20px;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        h1 {
            text-align: center;
            margin-bottom: 20px;
            color: #4a4a4a;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
            table-layout: fixed;
            /* 让表格宽度固定，防止内容多时表格变宽 */
        }

        th,
        td {
            text-align: left;
            padding: 10px;
            border-bottom: 1px solid #f1f1f1;
        }

        th {
            background-color: #607d8b;
            color: #ffffff;
        }

        tr:hover {
            background-color: #f5f5f5;
        }

        a {
            color: #1565c0;
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }

        .footer {
            text-align: right;
            font-size: 0.8em;
            color: #757575;
        }
    </style>
</head>

<body>
    <div class="container">
        <h1>文件列表</h1>
        <table>
            <thead>
                <tr>
                    <th>文件名</th>
                    <th>文件类型</th>
                    <th>文件大小</th>
                    <th>最新文件修改时间</th>
                </tr>
            </thead>
            <tbody>
                {% for item in items %}
                <tr>
                    <td><a href="{{item.path}}">{{item.name}}</a></td>
                    <td>{{item.file_type}}</td>
                    <td>{{item.size}}</td>
                    <td>{{item.time}}</td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
    <div class="footer">由baoge.org提供</div>
</body>

</html>